/* 基础表格样式 */
.table {
  width: 100%;
  margin-bottom: calc(var(--space-unit) * 2);
  color: var(--text-primary);
  border-collapse: collapse;
  background-color: var(--bg-color);
}

.table th,
.table td {
  padding: calc(var(--space-unit) * 1.5);
  vertical-align: top;
  border-top: 1px solid var(--border-color);
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  text-align: left;
}

.table tbody + tbody {
  border-top: 2px solid var(--border-color);
}

.table-sm th,
.table-sm td {
  padding: calc(var(--space-unit) * 0.75) calc(var(--space-unit) * 1);
}

/* 条纹表格 */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* 带边框表格 */
.table-bordered {
  border: 1px solid var(--border-color);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--border-color);
}

.table-bordered thead th,
.table-bordered thead td {
  border-bottom-width: 2px;
}

/* 悬停效果 */
.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* 响应式表格 */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .table-bordered {
  border: 0;
}

/* 表格颜色变体 */
.table-primary,
.table-primary > th,
.table-primary > td {
  background-color: var(--primary-light);
}

.table-primary th,
.table-primary td,
.table-primary thead th,
.table-primary tbody + tbody {
  border-color: var(--primary-color);
}

.table-secondary,
.table-secondary > th,
.table-secondary > td {
  background-color: var(--bg-secondary);
}

.table-success,
.table-success > th,
.table-success > td {
  background-color: rgba(76, 175, 80, 0.1);
}

.table-success th,
.table-success td,
.table-success thead th,
.table-success tbody + tbody {
  border-color: rgba(76, 175, 80, 0.2);
}

.table-warning,
.table-warning > th,
.table-warning > td {
  background-color: rgba(255, 152, 0, 0.1);
}

.table-warning th,
.table-warning td,
.table-warning thead th,
.table-warning tbody + tbody {
  border-color: rgba(255, 152, 0, 0.2);
}

.table-danger,
.table-danger > th,
.table-danger > td {
  background-color: rgba(244, 67, 54, 0.1);
}

.table-danger th,
.table-danger td,
.table-danger thead th,
.table-danger tbody + tbody {
  border-color: rgba(244, 67, 54, 0.2);
}

.table-info,
.table-info > th,
.table-info > td {
  background-color: rgba(33, 150, 243, 0.1);
}

.table-info th,
.table-info td,
.table-info thead th,
.table-info tbody + tbody {
  border-color: rgba(33, 150, 243, 0.2);
}